﻿/*
* HeroBuilder.cpp
*
* 武将创建器
*
* create date: 2014.4.17
* create by: leo
*
*/

#include "HeroBuilder.h"

USING_NS_CC;

CHeroBuilder& CHeroBuilder::getInstance()
{
	static CHeroBuilder builder;
	return builder;
}

CBaseHero* CHeroBuilder::createHero(const char* name)
{
	CBaseHero* hero = NULL;

	if (CCString::create("guanyu")->isEqual(CCString::create(name)))
	{
		hero = CBaseHero::create("{guanyu}");
	}
	else if (CCString::create("zhugeliang")->isEqual(CCString::create(name)))
	{
		hero = CBaseHero::create("{zhugeliang}");
	}
	return hero;
}

CHeroBuilder::CHeroBuilder()
{}

CHeroBuilder::~CHeroBuilder()
{}

bool CHeroBuilder::init()
{
	return true;
}

